/* eslint-disable */
import {createApp} from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/utils/svg'
import '@/assets/styles/global.less'
import '@/router/permission'
import usePermission from '@/router/permission'
import {vAuth} from '@/utils/directive'
import {clientSetting} from '@/config/client-setting'
import {keycloakOptions} from '@/config/keycloak-options'
import VueKeyCloakJs from '@dsb-norge/vue-keycloak-js'
import VForm3 from 'vform3-builds' //引入VForm3库

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'vform3-builds/dist/designer.style.css'//引入样式

import microApp from '@micro-zoe/micro-app'

// @ts-ignore
import VFormRender from '../public/js/render.umd.js' // 引入VFormRender组件
//引入css公共样式
import '../public/css/global.css'

// @ts-ignore
import elementPlusSetting from '@/config/elementuiplus.js'

// @ts-ignore
const vueApp = createApp(App).use(store).use(router).use(ElementPlus).use(VFormRender).use(elementPlusSetting).use(VForm3)
usePermission(router)

if (clientSetting.keycloakLogin) {
    vueApp.use(VueKeyCloakJs, keycloakOptions).mount('#app')
} else {
    vueApp.mount('#app')
}
usePermission(router)
vueApp.config.warnHandler = () => {
};
vueApp.config.globalProperties.$auth = vAuth

microApp.start()
